55/57

# orch.unpack

Restores the R objects that were compressed with a previous call to `orch.pack`.

Usage

    orch.unpack(...)

Arguments

. . .

  The name of a compressed object.

Usage Notes

This function is typically used at the beginning of a mapper or reducer function to obtain and prepare the input. However, it can also be used externally, such as at the R console, to unpack the results of a MapReduce job.

Consider this data flow:

`ORCH` client to mapper to combiner to reducer to `ORCH` client.

If the data is packed at one stage, then it must be unpacked at the next stage.

Return Value

Uncompressed list-type data, which can contain any number and any type of variables

See Also

`orch.pack`

Example

This code fragment restores the data that was compressed in the `orch.pack` example:

    reducer = function(key, vals) {
         x    <-orch.unpack(vals[[1]])
         r    <-x$qy
         yy   <- x$yy
         nRow <- x$nRows
         .
         .
         .
         }